/*
 * Flowable CMMN REST API
 * # flowable / flowəb(ə)l /    - a compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.  - a lightning fast, tried and tested BPMN 2 process engine written in Java. It is Apache 2.0 licensed open source, with a committed community.  - can run embedded in a Java application, or as a service on a server, a cluster, and in the cloud. It integrates perfectly with Spring. With a rich Java and REST API, it is the ideal engine for orchestrating human or system activities.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.ibm.risk.irmp.workflow.client.flowable.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Stage
 */

public class Stage {
  @JsonProperty("id")
  private String id = null;

  @JsonProperty("xmlRowNumber")
  private Integer xmlRowNumber = null;

  @JsonProperty("xmlColumnNumber")
  private Integer xmlColumnNumber = null;

  @JsonProperty("extensionElements")
  private Map<String, List<ExtensionElement>> extensionElements = null;

  @JsonProperty("attributes")
  private Map<String, List<ExtensionAttribute>> attributes = null;

  @JsonProperty("documentationTextFormat")
  private String documentationTextFormat = null;

  @JsonProperty("documentation")
  private String documentation = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("parent")
  private PlanFragment parent = null;

  @JsonProperty("planItemRef")
  private String planItemRef = null;

  @JsonProperty("defaultControl")
  private PlanItemControl defaultControl = null;

  @JsonProperty("lifecycleListeners")
  private List<FlowableListener> lifecycleListeners = null;

  @JsonProperty("planItem")
  private PlanItem planItem = null;

  @JsonProperty("planItemMap")
  private Map<String, PlanItem> planItemMap = null;

  @JsonProperty("sentries")
  private List<Sentry> sentries = null;

  @JsonProperty("exitCriteria")
  private List<Criterion> exitCriteria = null;

  @JsonProperty("autoComplete")
  private Boolean autoComplete = null;

  @JsonProperty("autoCompleteCondition")
  private String autoCompleteCondition = null;

  @JsonProperty("formKey")
  private String formKey = null;

  @JsonProperty("sameDeployment")
  private Boolean sameDeployment = null;

  @JsonProperty("validateFormFields")
  private String validateFormFields = null;

  @JsonProperty("displayOrder")
  private Integer displayOrder = null;

  @JsonProperty("includeInStageOverview")
  private String includeInStageOverview = null;

  @JsonProperty("planItemDefinitionMap")
  private Map<String, PlanItemDefinition> planItemDefinitionMap = null;

  @JsonProperty("planItemDefinitions")
  private List<PlanItemDefinition> planItemDefinitions = null;

  @JsonProperty("planModel")
  private Boolean planModel = null;

  @JsonProperty("case")
  private ModelCase _case = null;

  @JsonProperty("planItems")
  private List<PlanItem> planItems = null;

  @JsonProperty("parentStage")
  private Stage parentStage = null;

  public Stage id(String id) {
    this.id = id;
    return this;
  }

   /**
   * Get id
   * @return id
  **/
  @ApiModelProperty(value = "")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public Stage xmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
    return this;
  }

   /**
   * Get xmlRowNumber
   * @return xmlRowNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlRowNumber() {
    return xmlRowNumber;
  }

  public void setXmlRowNumber(Integer xmlRowNumber) {
    this.xmlRowNumber = xmlRowNumber;
  }

  public Stage xmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
    return this;
  }

   /**
   * Get xmlColumnNumber
   * @return xmlColumnNumber
  **/
  @ApiModelProperty(value = "")
  public Integer getXmlColumnNumber() {
    return xmlColumnNumber;
  }

  public void setXmlColumnNumber(Integer xmlColumnNumber) {
    this.xmlColumnNumber = xmlColumnNumber;
  }

  public Stage extensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
    return this;
  }

  public Stage putExtensionElementsItem(String key, List<ExtensionElement> extensionElementsItem) {
    if (this.extensionElements == null) {
      this.extensionElements = new HashMap<String, List<ExtensionElement>>();
    }
    this.extensionElements.put(key, extensionElementsItem);
    return this;
  }

   /**
   * Get extensionElements
   * @return extensionElements
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionElement>> getExtensionElements() {
    return extensionElements;
  }

  public void setExtensionElements(Map<String, List<ExtensionElement>> extensionElements) {
    this.extensionElements = extensionElements;
  }

  public Stage attributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
    return this;
  }

  public Stage putAttributesItem(String key, List<ExtensionAttribute> attributesItem) {
    if (this.attributes == null) {
      this.attributes = new HashMap<String, List<ExtensionAttribute>>();
    }
    this.attributes.put(key, attributesItem);
    return this;
  }

   /**
   * Get attributes
   * @return attributes
  **/
  @ApiModelProperty(value = "")
  public Map<String, List<ExtensionAttribute>> getAttributes() {
    return attributes;
  }

  public void setAttributes(Map<String, List<ExtensionAttribute>> attributes) {
    this.attributes = attributes;
  }

  public Stage documentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
    return this;
  }

   /**
   * Get documentationTextFormat
   * @return documentationTextFormat
  **/
  @ApiModelProperty(value = "")
  public String getDocumentationTextFormat() {
    return documentationTextFormat;
  }

  public void setDocumentationTextFormat(String documentationTextFormat) {
    this.documentationTextFormat = documentationTextFormat;
  }

  public Stage documentation(String documentation) {
    this.documentation = documentation;
    return this;
  }

   /**
   * Get documentation
   * @return documentation
  **/
  @ApiModelProperty(value = "")
  public String getDocumentation() {
    return documentation;
  }

  public void setDocumentation(String documentation) {
    this.documentation = documentation;
  }

  public Stage name(String name) {
    this.name = name;
    return this;
  }

   /**
   * Get name
   * @return name
  **/
  @ApiModelProperty(value = "")
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Stage parent(PlanFragment parent) {
    this.parent = parent;
    return this;
  }

   /**
   * Get parent
   * @return parent
  **/
  @ApiModelProperty(value = "")
  public PlanFragment getParent() {
    return parent;
  }

  public void setParent(PlanFragment parent) {
    this.parent = parent;
  }

  public Stage planItemRef(String planItemRef) {
    this.planItemRef = planItemRef;
    return this;
  }

   /**
   * Get planItemRef
   * @return planItemRef
  **/
  @ApiModelProperty(value = "")
  public String getPlanItemRef() {
    return planItemRef;
  }

  public void setPlanItemRef(String planItemRef) {
    this.planItemRef = planItemRef;
  }

  public Stage defaultControl(PlanItemControl defaultControl) {
    this.defaultControl = defaultControl;
    return this;
  }

   /**
   * Get defaultControl
   * @return defaultControl
  **/
  @ApiModelProperty(value = "")
  public PlanItemControl getDefaultControl() {
    return defaultControl;
  }

  public void setDefaultControl(PlanItemControl defaultControl) {
    this.defaultControl = defaultControl;
  }

  public Stage lifecycleListeners(List<FlowableListener> lifecycleListeners) {
    this.lifecycleListeners = lifecycleListeners;
    return this;
  }

  public Stage addLifecycleListenersItem(FlowableListener lifecycleListenersItem) {
    if (this.lifecycleListeners == null) {
      this.lifecycleListeners = new ArrayList<FlowableListener>();
    }
    this.lifecycleListeners.add(lifecycleListenersItem);
    return this;
  }

   /**
   * Get lifecycleListeners
   * @return lifecycleListeners
  **/
  @ApiModelProperty(value = "")
  public List<FlowableListener> getLifecycleListeners() {
    return lifecycleListeners;
  }

  public void setLifecycleListeners(List<FlowableListener> lifecycleListeners) {
    this.lifecycleListeners = lifecycleListeners;
  }

  public Stage planItem(PlanItem planItem) {
    this.planItem = planItem;
    return this;
  }

   /**
   * Get planItem
   * @return planItem
  **/
  @ApiModelProperty(value = "")
  public PlanItem getPlanItem() {
    return planItem;
  }

  public void setPlanItem(PlanItem planItem) {
    this.planItem = planItem;
  }

  public Stage planItemMap(Map<String, PlanItem> planItemMap) {
    this.planItemMap = planItemMap;
    return this;
  }

  public Stage putPlanItemMapItem(String key, PlanItem planItemMapItem) {
    if (this.planItemMap == null) {
      this.planItemMap = new HashMap<String, PlanItem>();
    }
    this.planItemMap.put(key, planItemMapItem);
    return this;
  }

   /**
   * Get planItemMap
   * @return planItemMap
  **/
  @ApiModelProperty(value = "")
  public Map<String, PlanItem> getPlanItemMap() {
    return planItemMap;
  }

  public void setPlanItemMap(Map<String, PlanItem> planItemMap) {
    this.planItemMap = planItemMap;
  }

  public Stage sentries(List<Sentry> sentries) {
    this.sentries = sentries;
    return this;
  }

  public Stage addSentriesItem(Sentry sentriesItem) {
    if (this.sentries == null) {
      this.sentries = new ArrayList<Sentry>();
    }
    this.sentries.add(sentriesItem);
    return this;
  }

   /**
   * Get sentries
   * @return sentries
  **/
  @ApiModelProperty(value = "")
  public List<Sentry> getSentries() {
    return sentries;
  }

  public void setSentries(List<Sentry> sentries) {
    this.sentries = sentries;
  }

  public Stage exitCriteria(List<Criterion> exitCriteria) {
    this.exitCriteria = exitCriteria;
    return this;
  }

  public Stage addExitCriteriaItem(Criterion exitCriteriaItem) {
    if (this.exitCriteria == null) {
      this.exitCriteria = new ArrayList<Criterion>();
    }
    this.exitCriteria.add(exitCriteriaItem);
    return this;
  }

   /**
   * Get exitCriteria
   * @return exitCriteria
  **/
  @ApiModelProperty(value = "")
  public List<Criterion> getExitCriteria() {
    return exitCriteria;
  }

  public void setExitCriteria(List<Criterion> exitCriteria) {
    this.exitCriteria = exitCriteria;
  }

  public Stage autoComplete(Boolean autoComplete) {
    this.autoComplete = autoComplete;
    return this;
  }

   /**
   * Get autoComplete
   * @return autoComplete
  **/
  @ApiModelProperty(value = "")
  public Boolean getAutoComplete() {
    return autoComplete;
  }

  public void setAutoComplete(Boolean autoComplete) {
    this.autoComplete = autoComplete;
  }

  public Stage autoCompleteCondition(String autoCompleteCondition) {
    this.autoCompleteCondition = autoCompleteCondition;
    return this;
  }

   /**
   * Get autoCompleteCondition
   * @return autoCompleteCondition
  **/
  @ApiModelProperty(value = "")
  public String getAutoCompleteCondition() {
    return autoCompleteCondition;
  }

  public void setAutoCompleteCondition(String autoCompleteCondition) {
    this.autoCompleteCondition = autoCompleteCondition;
  }

  public Stage formKey(String formKey) {
    this.formKey = formKey;
    return this;
  }

   /**
   * Get formKey
   * @return formKey
  **/
  @ApiModelProperty(value = "")
  public String getFormKey() {
    return formKey;
  }

  public void setFormKey(String formKey) {
    this.formKey = formKey;
  }

  public Stage sameDeployment(Boolean sameDeployment) {
    this.sameDeployment = sameDeployment;
    return this;
  }

   /**
   * Get sameDeployment
   * @return sameDeployment
  **/
  @ApiModelProperty(value = "")
  public Boolean getSameDeployment() {
    return sameDeployment;
  }

  public void setSameDeployment(Boolean sameDeployment) {
    this.sameDeployment = sameDeployment;
  }

  public Stage validateFormFields(String validateFormFields) {
    this.validateFormFields = validateFormFields;
    return this;
  }

   /**
   * Get validateFormFields
   * @return validateFormFields
  **/
  @ApiModelProperty(value = "")
  public String getValidateFormFields() {
    return validateFormFields;
  }

  public void setValidateFormFields(String validateFormFields) {
    this.validateFormFields = validateFormFields;
  }

  public Stage displayOrder(Integer displayOrder) {
    this.displayOrder = displayOrder;
    return this;
  }

   /**
   * Get displayOrder
   * @return displayOrder
  **/
  @ApiModelProperty(value = "")
  public Integer getDisplayOrder() {
    return displayOrder;
  }

  public void setDisplayOrder(Integer displayOrder) {
    this.displayOrder = displayOrder;
  }

  public Stage includeInStageOverview(String includeInStageOverview) {
    this.includeInStageOverview = includeInStageOverview;
    return this;
  }

   /**
   * Get includeInStageOverview
   * @return includeInStageOverview
  **/
  @ApiModelProperty(value = "")
  public String getIncludeInStageOverview() {
    return includeInStageOverview;
  }

  public void setIncludeInStageOverview(String includeInStageOverview) {
    this.includeInStageOverview = includeInStageOverview;
  }

  public Stage planItemDefinitionMap(Map<String, PlanItemDefinition> planItemDefinitionMap) {
    this.planItemDefinitionMap = planItemDefinitionMap;
    return this;
  }

  public Stage putPlanItemDefinitionMapItem(String key, PlanItemDefinition planItemDefinitionMapItem) {
    if (this.planItemDefinitionMap == null) {
      this.planItemDefinitionMap = new HashMap<String, PlanItemDefinition>();
    }
    this.planItemDefinitionMap.put(key, planItemDefinitionMapItem);
    return this;
  }

   /**
   * Get planItemDefinitionMap
   * @return planItemDefinitionMap
  **/
  @ApiModelProperty(value = "")
  public Map<String, PlanItemDefinition> getPlanItemDefinitionMap() {
    return planItemDefinitionMap;
  }

  public void setPlanItemDefinitionMap(Map<String, PlanItemDefinition> planItemDefinitionMap) {
    this.planItemDefinitionMap = planItemDefinitionMap;
  }

  public Stage planItemDefinitions(List<PlanItemDefinition> planItemDefinitions) {
    this.planItemDefinitions = planItemDefinitions;
    return this;
  }

  public Stage addPlanItemDefinitionsItem(PlanItemDefinition planItemDefinitionsItem) {
    if (this.planItemDefinitions == null) {
      this.planItemDefinitions = new ArrayList<PlanItemDefinition>();
    }
    this.planItemDefinitions.add(planItemDefinitionsItem);
    return this;
  }

   /**
   * Get planItemDefinitions
   * @return planItemDefinitions
  **/
  @ApiModelProperty(value = "")
  public List<PlanItemDefinition> getPlanItemDefinitions() {
    return planItemDefinitions;
  }

  public void setPlanItemDefinitions(List<PlanItemDefinition> planItemDefinitions) {
    this.planItemDefinitions = planItemDefinitions;
  }

  public Stage planModel(Boolean planModel) {
    this.planModel = planModel;
    return this;
  }

   /**
   * Get planModel
   * @return planModel
  **/
  @ApiModelProperty(value = "")
  public Boolean getPlanModel() {
    return planModel;
  }

  public void setPlanModel(Boolean planModel) {
    this.planModel = planModel;
  }

  public Stage _case(ModelCase _case) {
    this._case = _case;
    return this;
  }

   /**
   * Get _case
   * @return _case
  **/
  @ApiModelProperty(value = "")
  public ModelCase getCase() {
    return _case;
  }

  public void setCase(ModelCase _case) {
    this._case = _case;
  }

  public Stage planItems(List<PlanItem> planItems) {
    this.planItems = planItems;
    return this;
  }

  public Stage addPlanItemsItem(PlanItem planItemsItem) {
    if (this.planItems == null) {
      this.planItems = new ArrayList<PlanItem>();
    }
    this.planItems.add(planItemsItem);
    return this;
  }

   /**
   * Get planItems
   * @return planItems
  **/
  @ApiModelProperty(value = "")
  public List<PlanItem> getPlanItems() {
    return planItems;
  }

  public void setPlanItems(List<PlanItem> planItems) {
    this.planItems = planItems;
  }

  public Stage parentStage(Stage parentStage) {
    this.parentStage = parentStage;
    return this;
  }

   /**
   * Get parentStage
   * @return parentStage
  **/
  @ApiModelProperty(value = "")
  public Stage getParentStage() {
    return parentStage;
  }

  public void setParentStage(Stage parentStage) {
    this.parentStage = parentStage;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Stage stage = (Stage) o;
    return Objects.equals(this.id, stage.id) &&
        Objects.equals(this.xmlRowNumber, stage.xmlRowNumber) &&
        Objects.equals(this.xmlColumnNumber, stage.xmlColumnNumber) &&
        Objects.equals(this.extensionElements, stage.extensionElements) &&
        Objects.equals(this.attributes, stage.attributes) &&
        Objects.equals(this.documentationTextFormat, stage.documentationTextFormat) &&
        Objects.equals(this.documentation, stage.documentation) &&
        Objects.equals(this.name, stage.name) &&
        Objects.equals(this.parent, stage.parent) &&
        Objects.equals(this.planItemRef, stage.planItemRef) &&
        Objects.equals(this.defaultControl, stage.defaultControl) &&
        Objects.equals(this.lifecycleListeners, stage.lifecycleListeners) &&
        Objects.equals(this.planItem, stage.planItem) &&
        Objects.equals(this.planItemMap, stage.planItemMap) &&
        Objects.equals(this.sentries, stage.sentries) &&
        Objects.equals(this.exitCriteria, stage.exitCriteria) &&
        Objects.equals(this.autoComplete, stage.autoComplete) &&
        Objects.equals(this.autoCompleteCondition, stage.autoCompleteCondition) &&
        Objects.equals(this.formKey, stage.formKey) &&
        Objects.equals(this.sameDeployment, stage.sameDeployment) &&
        Objects.equals(this.validateFormFields, stage.validateFormFields) &&
        Objects.equals(this.displayOrder, stage.displayOrder) &&
        Objects.equals(this.includeInStageOverview, stage.includeInStageOverview) &&
        Objects.equals(this.planItemDefinitionMap, stage.planItemDefinitionMap) &&
        Objects.equals(this.planItemDefinitions, stage.planItemDefinitions) &&
        Objects.equals(this.planModel, stage.planModel) &&
        Objects.equals(this._case, stage._case) &&
        Objects.equals(this.planItems, stage.planItems) &&
        Objects.equals(this.parentStage, stage.parentStage);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, xmlRowNumber, xmlColumnNumber, extensionElements, attributes, documentationTextFormat, documentation, name, parent, planItemRef, defaultControl, lifecycleListeners, planItem, planItemMap, sentries, exitCriteria, autoComplete, autoCompleteCondition, formKey, sameDeployment, validateFormFields, displayOrder, includeInStageOverview, planItemDefinitionMap, planItemDefinitions, planModel, _case, planItems, parentStage);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Stage {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    xmlRowNumber: ").append(toIndentedString(xmlRowNumber)).append("\n");
    sb.append("    xmlColumnNumber: ").append(toIndentedString(xmlColumnNumber)).append("\n");
    sb.append("    extensionElements: ").append(toIndentedString(extensionElements)).append("\n");
    sb.append("    attributes: ").append(toIndentedString(attributes)).append("\n");
    sb.append("    documentationTextFormat: ").append(toIndentedString(documentationTextFormat)).append("\n");
    sb.append("    documentation: ").append(toIndentedString(documentation)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    parent: ").append(toIndentedString(parent)).append("\n");
    sb.append("    planItemRef: ").append(toIndentedString(planItemRef)).append("\n");
    sb.append("    defaultControl: ").append(toIndentedString(defaultControl)).append("\n");
    sb.append("    lifecycleListeners: ").append(toIndentedString(lifecycleListeners)).append("\n");
    sb.append("    planItem: ").append(toIndentedString(planItem)).append("\n");
    sb.append("    planItemMap: ").append(toIndentedString(planItemMap)).append("\n");
    sb.append("    sentries: ").append(toIndentedString(sentries)).append("\n");
    sb.append("    exitCriteria: ").append(toIndentedString(exitCriteria)).append("\n");
    sb.append("    autoComplete: ").append(toIndentedString(autoComplete)).append("\n");
    sb.append("    autoCompleteCondition: ").append(toIndentedString(autoCompleteCondition)).append("\n");
    sb.append("    formKey: ").append(toIndentedString(formKey)).append("\n");
    sb.append("    sameDeployment: ").append(toIndentedString(sameDeployment)).append("\n");
    sb.append("    validateFormFields: ").append(toIndentedString(validateFormFields)).append("\n");
    sb.append("    displayOrder: ").append(toIndentedString(displayOrder)).append("\n");
    sb.append("    includeInStageOverview: ").append(toIndentedString(includeInStageOverview)).append("\n");
    sb.append("    planItemDefinitionMap: ").append(toIndentedString(planItemDefinitionMap)).append("\n");
    sb.append("    planItemDefinitions: ").append(toIndentedString(planItemDefinitions)).append("\n");
    sb.append("    planModel: ").append(toIndentedString(planModel)).append("\n");
    sb.append("    _case: ").append(toIndentedString(_case)).append("\n");
    sb.append("    planItems: ").append(toIndentedString(planItems)).append("\n");
    sb.append("    parentStage: ").append(toIndentedString(parentStage)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
